using System;
using BusinessLayer;

namespace dpatoolkit.UILayer
{
	/// <summary>
	/// represents the interface for an project/plugin
	/// </summary>
	/// 
	public  delegate void ProjectClosing(IUIProjectUnit project);


	public interface IUIProjectUnit
	{
		event ProjectClosing ProjectClosing;

		bool New(ProjectComponentType compType);
		bool Command(MdiCommand command);
        
        bool Open(string filename);
		bool Open(IDesignPatternSubject subject);

        bool Save(bool confirm);
		bool SaveAs();
		void Close();

		string File();
		string ProjectName();
		void UpdateUI();
		void Recover();
		ProjectType ProjectType{get;}
		IDesignPatternSubject Subject{get;set;}

    }

    public enum ProjectType
    {
        Project,
        DesignPatternPlugin,
        Unknown
    }

    public enum ProjectComponentType
    {
        ClassDiagram,
        SequenceDiagram,
        ActivityDiagram,
        ComponentDiagram,
        Unknown
    }
}
